• Inside the loop and outside the if-else statement, use Add Value to add 40 to x each time the loop runs.
  • Outside the loop, check if the guess matches the code.
  • If it does, have your sprite say that and make a sprite appear as a prize.
  • Create a String Variable named status with the value "true!"
  • Use a Return Statement and to return status.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)